using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Workflow._Properties
{
    /// <summary>
    /// <para>Update Property Count</para>
    /// <para>Increases the value in an extended property by the update value each time the tool is executed so that metrics are recorded.</para>
    /// <para>每次执行工具时，将扩展属性中的值增加更新值，以便记录指标。</para>
    /// </summary>    
    [DisplayName("Update Property Count")]
    public class UpdatePropertyCount : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdatePropertyCount()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_job_id">
        /// <para>Job ID</para>
        /// <para>The ID of the Workflow Manager (Classic) job that will be updated.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的 ID。</para>
        /// </param>
        /// <param name="_properties_table_name">
        /// <para>Properties Table Name</para>
        /// <para>The name of the extended properties table that will be updated.</para>
        /// <para>将要更新的扩展属性表的名称。</para>
        /// </param>
        /// <param name="_property_field">
        /// <para>Property Field</para>
        /// <para>The property to be updated in the selected extended properties table.</para>
        /// <para>要在选定的扩展属性表中更新的属性。</para>
        /// </param>
        /// <param name="_update_value">
        /// <para>Update Value</para>
        /// <para>The value by which the selected extended property will be increased.</para>
        /// <para>所选扩展属性将增加的值。</para>
        /// </param>
        public UpdatePropertyCount(long? _job_id, object _properties_table_name, object _property_field, long? _update_value)
        {
            this._job_id = _job_id;
            this._properties_table_name = _properties_table_name;
            this._property_field = _property_field;
            this._update_value = _update_value;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Update Property Count";

        public override string CallName => "topographic.UpdatePropertyCount";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_job_id, _properties_table_name, _property_field, _update_value, _database_path, _updated_job_id];

        /// <summary>
        /// <para>Job ID</para>
        /// <para>The ID of the Workflow Manager (Classic) job that will be updated.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _job_id { get; set; }


        /// <summary>
        /// <para>Properties Table Name</para>
        /// <para>The name of the extended properties table that will be updated.</para>
        /// <para>将要更新的扩展属性表的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Properties Table Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _properties_table_name { get; set; }


        /// <summary>
        /// <para>Property Field</para>
        /// <para>The property to be updated in the selected extended properties table.</para>
        /// <para>要在选定的扩展属性表中更新的属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Property Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _property_field { get; set; }


        /// <summary>
        /// <para>Update Value</para>
        /// <para>The value by which the selected extended property will be increased.</para>
        /// <para>所选扩展属性将增加的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _update_value { get; set; }


        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件 （.jtc）。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database_path { get; set; } = null;


        /// <summary>
        /// <para>Updated Job ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _updated_job_id { get; set; }


        public UpdatePropertyCount SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}